package collection.list;

import java.util.ArrayList;
import java.util.Random;

/**
 * 生成 1-26 数字乱码集合
 */
public class Test {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 1; i < 27; i++) {
            arrayList.add(i);
        }

        Random random = new Random();
        for (int i = 0; i < 26; i++) {
            int i1 = random.nextInt(26 - i);
            list.add(arrayList.get(i1));
            arrayList.remove(i1);
        }

        System.out.println(list);
        System.out.println(list.size());
    }

}
